#include "main.h"             






int main(void)
{
	u8 key;
	u8 mode = 0;

	
	led_init();
	motor_init();
	key_init();
	
		
	while(1)
	{
		key = key_scan();
		
		if(key == 1)
		{
			mode++;
		}
		switch(mode)
		{
			case 1:LED_ON;break;
			case 2:LED_OFF;break;
			case 3:MI_ON;break;
			case 4:MI_OFF;mode = 0;break;
		}
		
	}
	
	
	return 0;
}




























